<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="root" class="container wrapper">
    <div class="top container">
      <div class="bd container">
        <ul>
          <li>1</li>
          <li>2</li>
          <li>3</li>
          <li>4</li>
          <li>5</li>
        </ul>
      </div>
    </div>
    <div class="footer container"></div>
  </div>

  <script>
    // 在HTML中，找到所有class为xx的标签，并删除这些class

    let removeAllClass = (className) => {
      // 找到所有包含class为className的标签
      let arr = document.querySelectorAll(`.${className}`);
      // 删除这些标签对应的class
      Array.prototype.forEach.call(arr, (el) => {
        el.classList.remove(className);
        console.log(el);
      })
    }

    removeAllClass('container')

  </script>
</body>

</html>